﻿using HenuAlbum.ResponseModels;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace HenuAlbum.Controllers
{
    [ApiController]
    [Route("[controller]")]
    public class ErrorController : ControllerBase
    {
        [NonAction]
        [Route("/error")]
        public IActionResult Error() => StatusCode(500, new ResponseBase(ErrorCode.InternalError, "发生内部错误, 请联系管理员."));

        [HttpGet("/")]
        public IActionResult Index()
        {
            return Redirect("/index.html");
        }
    }
}
